export default {
    color: {
        'color-brand': '#74e388',
        'color-brand-light': '#97eaa6',
        'color-brand-dark': '#5db66d',
        primary: '#3b86fd',
        primaryDeep: '#506db6',
        primaryChange: '#6aa9ff',
        success: '#3be88e',
        danger: '#f44f4d',
        warning: '#ead1a6',
        page_bg: '#f5f5f5'
    },
    tabHeight: 7
}

export const IS_DEV = process.env.NODE_ENV === 'development';
console.log(process.env.NODE_ENV);

export const BASE_URL = IS_DEV ? 'http://blingbling.xin:7300/mock/5ce3679f1eb62800167d81a6/travel/stravel/' : 'https://www.blingbling.xin/stravel/';

export const HTTP_STATUS = {
    SUCCESS: 200,
    CREATED: 201,
    ACCEPTED: 202,
    CLIENT_ERROR: 400,
    AUTHENTICATE: 401,
    FORBIDDEN: 403,
    NOT_FOUND: 404,
    SERVER_ERROR: 500,
    BAD_GATEWAY: 502,
    SERVICE_UNAVAILABLE: 503,
    GATEWAY_TIMEOUT: 504
};

export const HTTP_ERROR = {
    '400': '发出的请求有错误，服务器没有进行新建或修改数据的操作。',
    '401': '用户没有权限（令牌、用户名、密码错误）。',
    '403': '用户得到授权，但是访问是被禁止的。',
    '404': '请求不存在',
    '406': '请求的格式不可得。',
    '410': '请求的资源被永久删除，且不会再得到的。',
    '422': '当创建一个对象时，发生一个验证错误。',
    '500': '服务器发生错误，请检查服务器。',
    '502': '服务端出现了问题。',
    '503': '服务不可用，服务器暂时过载或维护。',
    '504': '网关超时。',
};

export const RESPONSE_MODEL = {
    RES_CODE: 'code',
    RES_DATA: 'data',
    RES_MESSAGE: 'message',
};

export const TOKEN_KEY = 'Authorization';

export const CONTENT_TYPE = 'application/json; charset=utf-8';
export const UPLOAD_CONTENT_TYPE = '';

export const DATA_URLS = {
    SIGN_IN: 'signIn',
    LOGIN: 'login',
};

export const PAGE_URLS = {
    LOGIN: "/pages/login/login",
    BOOK_LIST: "/pages/find/list",
    BOOK_DETAIL: "/pages/find/list/index",
    BOOK_LIST_DETAIL: "/pages/find/list/index",
};
